#include "mouselistener.h"
#include "keyboardlistener.h"
#include "Util.h"
namespace Core
{
	using Devices::MouseEvent;
	namespace UI
	{
		class UIBase: public Devices::MouseListener,public Devices::KeyboardListener
		{
		public:
			Core::Position m_pos;
			Core::Size m_size;

			bool m_isMouseIn;
			bool m_isLeftDown;

			UIBase(const Position& pos,const Size& size);
			virtual void OnMouseEvent(MouseEvent& mouse);

			virtual void OnMouseIn(const MouseEvent& mouse){}
			virtual void OnMouseOut(const MouseEvent& mouse){}
			virtual void OnMouseDown(const MouseEvent& mouse,const Devices::KeyboardEvent& keyboardMessage){}
			virtual void OnMouseUp(const MouseEvent& mouse, const Devices::KeyboardEvent& keyboardMessage) {}
			virtual void OnMouseClick(const MouseEvent& mouse,const Devices::KeyboardEvent& keyboardMessage){}
		};
	}
}